app.service("userOrderService",function ($http) {
    //查询所有订单
    this.findAll=function (status) {
        return $http.get("./userOrderController/findAll.do?status="+status);
    }
    //更新状态
    this.updateState=function(id,status){
        return $http.get('../userOrderController/updateState.do?id='+id+"&status="+status);
    }
    //发现根据订单 id 查询订单详情
    this.findOrderItem=function (orderId) {
        return $http.get("./userOrderController/findOrderItem.do?orderId="+orderId);
    }
    //提交退款请求
    this.submitRefundRequest=function (id) {
        return $http.get("./refundController/submitRefundRequest.do?orderItemId="+id);
    }
});